package com.example.tool.bean.business;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

import static com.example.tool.conf.WarehouseMsgConfig.collectionDelayKeyTemplate;
import static com.example.tool.conf.WarehouseMsgConfig.transferTimeoutAfterKeyTemplate;
import static com.example.tool.conf.WarehouseMsgConfig.transferTimeoutKeyTemplate;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class WarehouseConfigEntity {
    /**
     * 仓库类型 1冻品 2常温
     */
    private String type;
    /**
     * 审单群参数
     */
    private WarehouseInterceptionConfig libraryInterceptionConfig;
    /**
     * 快递群参数
     */
    private List<WarehouseExpressDeliveryConfig>transitInterceptionConfigs=new ArrayList<>();

    public static void main(String[] args) {
        List<String>prefixs= Arrays.asList(collectionDelayKeyTemplate.substring(0, collectionDelayKeyTemplate.lastIndexOf(":")),
                transferTimeoutKeyTemplate.substring(0, transferTimeoutKeyTemplate.lastIndexOf(":")),
                transferTimeoutAfterKeyTemplate.substring(0, transferTimeoutAfterKeyTemplate.lastIndexOf(":")));
        System.out.println(prefixs);
    }

}
